home *** CD-ROM | disk | FTP | other *** search
- #ifndef __TRIANGLE_H
- #define __TRIANGLE_H
-
- // -[Keep_Heading]-
-
-
- // -[Copyright_Mesg]-
- // --------------------------------------------------------------- //
- // (c) Copyright 1993-1994. Step Ahead Software Pty Limited. All rights reserved.
- // Class Header Filename: TRIANGLE.h
- // Description:
- // Implements triangle objects.
- // --------------------------------------------------------------- //
- #define CC_GEN 1
- #include "SHAPE.h"
-
- #include "genclsid.h"
-
-
- // -[Keep_h_Extras]-
-
-
- // -[Class_Dec]-
- class Triangle;
- typedef Triangle * PTriangle;
- typedef Triangle & RTriangle;
- typedef Triangle * & RPTriangle;
- typedef const Triangle * PCTriangle;
- typedef const Triangle & RCTriangle;
-
- class Triangle : public Shape
- {
- // -[Keep_Class_Extras]-
-
-
- // -[Member_Data_Decs]-
- public:
- protected:
-
- // Length of sides of triagles. (Assume equilateral triangle!)
- int SideLength;
- private:
-
-
- // -[Member_Function_Decs]-
- public:
-
- Triangle(int InitX, int InitY, int InitSide);
-
- virtual hashValueType hashValue() const;
-
- virtual classType isA() const;
-
- virtual int isEqual(const Object& testObject) const;
-
- virtual char * nameOf() const;
-
- virtual void printOn(Rostream outputStream) const;
-
- virtual void Show(HDC hDC);
- protected:
- private:
-
-
- // -[Persistent_1]-
- // OWL1.0 Streamability
- public:
- Triangle(StreamableInit); // Used to create a new object
- static PTStreamable build();
- protected:
- virtual Pvoid read(Ripstream is); virtual void write(Ropstream os);
- private:
- virtual const Pchar streamableName() const;
-
- };
-
- // -[Persistent_2]-
- // OWL1.0 Streamability
- inline Ripstream operator >> ( Ripstream is, RTriangle cl )
- { return is >> (RTStreamable)cl; }
- inline Ripstream operator >> ( Ripstream is, RPTriangle cl )
- { return is >> (RPvoid)cl; }
- inline Ropstream operator << ( Ropstream os, RCTriangle cl )
- { return os << (RTStreamable)cl; }
- inline Ropstream operator << ( Ropstream os, PCTriangle cl )
- { return os << (PTStreamable)cl; }
-
-
- // -[Keep]-
-
-
- // -[Global_Data_Decs]-
-
-
- // -[Global_Function_Decs]-
-
- // -[Function_Defs]-
-
- // -[End_Cond]-
- #endif __TRIANGLE_H